package org.ldh.service.impl;

import org.ldh.dao.BookBorrowDao;
import org.ldh.dao.impl.BookBorrowDaoImpl;
import org.ldh.domain.BookBorrow;
import org.ldh.service.BookBorrowService;

import java.util.List;

/**
 * 图书借阅的业务层实现类
 */
public class BookBorrowServiceImpl implements BookBorrowService {
    //调用dao层
    BookBorrowDao bookBorrowDao = new BookBorrowDaoImpl();

    @Override
    public List<BookBorrow> findAll() {
        return bookBorrowDao.findAll();
    }

    @Override
    public BookBorrow findById(String bookId) {
        return bookBorrowDao.findById(bookId);
    }

    @Override
    public void save(BookBorrow bookBorrow) {
        bookBorrowDao.save(bookBorrow);
    }

    @Override
    public void update(BookBorrow bookBorrow) {
        bookBorrowDao.update(bookBorrow);
    }

    @Override
    public void delete(String bookId) {
        bookBorrowDao.delete(bookId);
    }
}
